package com.hand.pp.config;/**
 * @author Estelle@앙수청
 * @date 2019/7/17 10:28
 */

import com.hand.pp.interceptor.ControllerInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 *  @author Estelle@앙수청
 *  @date 2019/7/17 10:28
 */
@Configuration
public class WebConfig implements WebMvcConfigurer {

    @Autowired
    private ControllerInterceptor interceptor;

    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(interceptor).addPathPatterns("/**");
    }

//    @Override
//    public void addResourceHandlers(ResourceHandlerRegistry registry) {
//
//    }
}
